package structural.facade;

public class NotificationService {
    public void send(String message, String target) {
        NotificationServer server = new NotificationServer();
        Connection connection = server.connect("10.64.1.1");
        AuthToken authToken = server.authenticate("appID", "key");

        boolean isSent = server.sendMessage(new Message(message), authToken, target);
        if (isSent) {
            System.out.println("Message sent successfully.");
        } else {
            System.out.println("Failed to send message.");
        }
        server.disconnect(connection);
    }
}
